<#import "/layout.html" as c>
    <@c.html title="Index">

    <style type="text/css">
        .mytable {
            color: #333;
            width: 96%;
            margin: 10px;
        }

        .mytable input {
            width: 120px;
            height: auto;
        }

        .mytable .lable {
            text-align: right;
            width: 300px;
            background: #eee;
        }

        .btn {
            padding-top: 1px;
            padding-bottom: 1px;
        }

        .mytable td {
            padding: 5px;
            width: 11%;
            vertical-align:middle;

        }

        .mytable button {
            float: right;
        }

        tbody {
            padding: 1px;
        }

        select {
            min-width: 120px;
            padding: 3px 8px;
            color: #666;
            border-radius: 5px;
            outline: none;
        }
    </style>

    <!-- 开始页面内容 -->
    <div id="content" class="content">

        <!-- 开始面包屑导航 -->
        <ol class="breadcrumb pull-right">
            <li><a href="javascript:;">首页</a></li>
            <#list menuState.breadCrumbList as breadCrumb>
                <li class="">${breadCrumb}</li>
            </#list>
        </ol>
        <!-- 结束面包屑导航 -->

        <!-- 开始页头区域 -->
        <h1 class="page-header">策略信息
            <small class="m-l-10">策略详细信息</small>
        </h1>
        <!-- 结束页头区域 -->

        <!-- 基本信息 begin row -->
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-inverse" data-no-drag="true">
                    <div class="panel-heading">
                        <div class="panel-heading-btn"></div>
                        <h4 class="panel-title">基本信息</h4>
                    </div>
                    <div class="panel-body">
                        <div style="position: relative;">

                            <table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;"
                                   class="mytable">
                                <tbody>
                                <tr>
                                    <td class="lable">策略ID</td>
                                    <td>${order.id!""}</td>
                                    <td class="lable">点买人</td>
                                    <td>${user.userName!""}</td>
                                    <td class="lable">状态</td>
                                    <td>
                                        <#if order.status == 1>待接单
                                        <#elseif order.status == 2>委托中
                                        <#elseif order.status == 3>持仓中
                                        <#elseif order.status == 4>平仓中
                                        <#elseif order.status == 5>清算中
                                        <#elseif order.status == 6>已清算
                                        <#elseif order.status == 7>已流单
                                        <#elseif order.status == 8>已撤单
                                        </#if>
                                    </td>
                                    <td class="lable">每手手续费</td>
                                    <td>${order.fee!"0.00"}</td>
                                    <td class="lable">品种合约</td>
                                    <td>${order.name!""}</td>
                                </tr>
                                <tr>
                                    <td class="lable">点买人保证金</td>
                                    <td>${order.deposit!"0.00"}</td>
                                    <td class="lable">盈亏</td>
                                    <td>${order.profit!""}</td>
                                    <td class="lable">跟单类型</td>
                                    <td> <#if order.follow == 1>点买单
                                        <#elseif order.follow == 2>跟单</#if></td>
                                    <td class="lable">所跟模拟订单</td>
                                    <td>
                                        <#if simId == 0>无
                                        <#else>
                                            <a href=${adminRoot}orderSimulate/detail?orderSimulateId=${simId}>${simId}</a>
                                        </#if>
                                    </td>
                                </tr>
                                </tbody>
                            </table>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- end row -->

        <!-- 开仓信息 begin row -->
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-inverse" data-no-drag="true">
                    <div class="panel-heading">
                        <div class="panel-heading-btn"></div>
                        <h4 class="panel-title">开仓信息</h4>
                    </div>
                    <div class="panel-body">
                        <div style="position: relative;">

                            <table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;"
                                   class="mytable">
                                <tbody>
                                <tr>
                                    <td class="lable">合约号</td>
                                    <td>${order.contract!""}</td>
                                    <td class="lable">策略发起时间</td>
                                    <td>${order.createTime?string('yyyy-MM-dd HH:mm:ss')}</td>
                                    <td class="lable">成交时间</td>
                                    <td><#if order.openTime??>${order.openTime?string('yyyy-MM-dd HH:mm:ss')}<#else>无</#if></td>
                                </tr>
                                <tr>
                                    <td class="lable">交易方向</td>
                                    <td>
                                        <#if order.direction == 1>看涨
                                        <#elseif order.direction == 2>看跌
                                        </#if>
                                    </td>
                                    <td class="lable">委托方式</td>
                                    <td>
                                        <#if order.openWay == 1>市价
                                        <#elseif order.openWay == 2>限价
                                        </#if>
                                    </td>
                                    <td class="lable">开仓价（）</td>
                                    <td>${order.openPrice!""}</td>
                                </tr>
                                </tbody>
                            </table>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- end row -->

        <!-- 平仓信息 begin row -->
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-inverse" data-no-drag="true">
                    <div class="panel-heading">
                        <div class="panel-heading-btn"></div>
                        <h4 class="panel-title">平仓信息</h4>
                    </div>
                    <div class="panel-body">
                        <div style="position: relative;">

                            <table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;"
                                   class="mytable">
                                <tbody>
                                <tr>
                                    <td class="lable">合约号</td>
                                    <td>${order.contract!""}</td>
                                    <td class="lable">策略发起时间</td>
                                    <td>${order.createTime?string('yyyy-MM-dd HH:mm:ss')}</td>
                                    <td class="lable">成交时间</td>
                                    <td><#if order.settleTime??>${order.settleTime?string('yyyy-MM-dd HH:mm:ss')}<#else>无</#if></td>
                                </tr>
                                <tr>
                                    <td class="lable">交易方向</td>
                                    <td>
                                        <#if order.direction == 1>看跌
                                            <#elseif order.direction == 2>看涨
                                        </#if>
                                    </td>
                                    <td class="lable">委托方式</td>
                                    <td>
                                        <#if order.settleWay == 1>市价
                                            <#elseif order.settleWay == 2>限价
                                        </#if>
                                    </td>
                                    <td class="lable">平仓价</td>
                                    <td>${order.settlePrice!""}</td>
                                </tr>
                                </tbody>
                            </table>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- end row -->

        <!--结算信息 begin row -->
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-inverse" data-no-drag="true">
                    <div class="panel-heading">
                        <div class="panel-heading-btn"></div>
                        <h4 class="panel-title">结算信息</h4>
                    </div>
                    <div class="panel-body">
                        <div style="position: relative;">

                            <table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;"
                                   class="mytable">
                                <tbody>
                                <tr>
                                    <td class="lable">总盈亏</td>
                                    <td>${order.profit!""}</td>
                                    <td class="lable">点买人盈亏分配</td>
                                    <td>${userProfit!""}</td>
                                </tr>
                                <tr>
                                    <td class="lable">点买人亏损金额</td>
                                    <td>${userLose!""}</td>
                                    <td class="lable">返还点买人保证金</td>
                                    <td>${backUserDeposit!""}</td>
                                </tr>
                                </tbody>
                            </table>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- end row -->

    </div>
</@c.html>

<!-- ================== 开始页面级JavaScrip调用 ================== -->
<script src="${pluginsRoot}bootstrap-wizard/js/bwizard.js"></script>
<!-- 表单checkbox项 -->
<script src="${pluginsRoot}bootstrap-switch/bootstrap-switch.min.js"></script>
<!-- 日历控件 -->
<script src="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/WdatePicker.js" defer="defer"></script>